package com.create404.suishoupai.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.create404.suishoupai.dto.CommentedNewsDto;
import com.create404.suishoupai.entity.NewsComment;
import com.create404.suishoupai.mapper.NewsCommentMapper;
import com.create404.suishoupai.service.INewsCommentService;
import com.create404.suishoupai.vo.NewsCommentListItemVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author create404
 * @since 2021-07-17
 */
@Service
public class NewsCommentServiceImpl extends ServiceImpl<NewsCommentMapper, NewsComment> implements INewsCommentService {
    @Override
    public List<NewsCommentListItemVO> getNewsCommentList(String newsId) {
        return this.baseMapper.getNewsCommentList(newsId);
    }


    @Autowired
    NewsCommentMapper newsCommentMapper;

    @Override
    public IPage<CommentedNewsDto> getCommentedNews(Page<?> page, String employeeId) {
        return newsCommentMapper.getCommentedNews(page, employeeId);
    }
}
